// pages/tpl/tpl.js
const http = require("../../api/http")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    templateList: [
      { src: http.imageUrl('template/t-1.png'), no: '1' },
      { src: http.imageUrl('template/t-2.png'), no: '2' },
      { src: http.imageUrl('template/t-3.png'), no: '3' },
      { src: http.imageUrl('template/t-4.png'), no: '4' }
    ]
  },
  onPullDownRefresh() {
    wx.stopPullDownRefresh()
  },
  templateDetail: function (event) {
    const { id, templateId } = event.currentTarget.dataset
    wx.navigateTo({
      url: `/pages/template/template?templateId=${templateId}&printId=${id}`,
    })
  },
})